Increasing the Applicability of LR Parsing

نویسندگان

  • Mark-Jan Nederhof
  • Janos J. Sarbo
چکیده

In this paper we discuss a phenomenon present in some context-free grammars, called hidden left recursion. We show that ordinary LR parsing according to hidden left-recursive grammars is not possible and we indicate a range of solutions to this problem. One of these solutions is a new parsing technique, which is a variant of traditional LR parsing. This new parsing technique can be used both with and without lookahead and the nondeterminism can be realized using backtracking or using a graph-structured stack.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Unifying LL and LR parsing

In parsing theory, LL parsing and LR parsing are regarded to be two distinct methods. In this paper the relation between these methods is cla-riied. As shown in literature on parsing theory, for every context-free grammar, a so-called non-deterministic LR(0) automaton can be constructed. Here, we show, that traversing this automaton in a special way is equivalent to LL(1) parsing. This automato...

متن کامل

Lr Parsing = Grammar Transformation + Ll Parsing Making Lr Parsing More Understandable and More Eecient

The paper has three aims. Its primary focus is a derivation method which is | in contrast to many of the classical presentations in the literature | easy to comprehend and thus easy to adapt to di erent needs. Secondly, it presents an improved LR parser which has the power of LR parsing, but (almost) the e ciency of LALR parsing. Finally, it elucidates the strong conceptual relationships that a...

متن کامل

Faster Generalized LR Parsing

Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars e ciently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers b...

متن کامل

GLR Parser with Conditional Action Model(CAM)

There are two different approaches in the LR parsing. The first one is the deterministic approach that performs the only one action using the control rules learned without any LR parsing resource. It shows good performance in speed. But it has a disadvantage that it cannot correct the previous mistakes, thus directly affects the parsing result. The second one is the probabilistic LR parsing app...

متن کامل

An Efficient Augmented-Context-Free Parsing Algorithm

An efficient parsing algorithm for augmented context-free grammars is introduced, and its application to on-line natural language interfaces discussed. The algorithm is a generalized LR parsing algorithm, which precomputes an LR shift-reduce parsing table (possibly with multiple entries) from a given augmented context-free grammar. Unlike the standard LR parsing algorithm, it can handle arbitra...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993